Skip to content

citron-emu: init at version 0.12.25#482846

Merged
pbsds merged 1 commit into
NixOS:masterfrom
samemrecebi:init-citron
Feb 10, 2026
Merged

citron-emu: init at version 0.12.25#482846
pbsds merged 1 commit into
NixOS:masterfrom
samemrecebi:init-citron

Conversation

@samemrecebi
Copy link
Copy Markdown
Contributor

@samemrecebi samemrecebi commented Jan 22, 2026

Things done

Derivation that builds citron-emu. Citron-emu is a fork of the now archived yuzu. Compared to other forks this one is still actively maintained and also displays a strong anti-piracy stance clearly stating the software is for running Nintendo Switch Homebrew games. See FAQ

The derevation comes as a mix of the repos citron.nix by @simonwjackson and citron-flake by @Zempashi. I was not able to use what they have done but after some modifications to both of their work I was able to get it running.

Unlike the 2 previous implementations, the external dependency nx_tbdb is fetched direcly as the original build process also direcly fetches a URL using the cmake file. See here

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

@samemrecebi samemrecebi requested a review from pbsds January 22, 2026 23:17
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jan 22, 2026
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
@mio-19
Copy link
Copy Markdown
Contributor

mio-19 commented Jan 23, 2026

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 482846
Commit: d37f7f32e3351c00dc4314abba831313c5083f9c


x86_64-linux

✅ 1 package built:
  • citron-emu

@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 23, 2026
@samemrecebi samemrecebi requested a review from mio-19 January 23, 2026 16:40
Copy link
Copy Markdown
Contributor

@marcin-serwin marcin-serwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The derevation comes as a mix of the repos citron.nix by @​simonwjackson and citron-flake by @​Zempashi.

The first repo is licensed under GPL-2.0-or-later while there is no license statement in the second one. This means that work based on them cannot be legally incorporated into nixpkgs.

@pbsds
Copy link
Copy Markdown
Member

pbsds commented Jan 24, 2026

I believe citron should be safe to distribute with nixpkgs, since they share a similar anti-piracy stance to azahar, and since they have a clearnet download of the source available unlike some of the previous yuzu forks. Nintendo has admitted that emulation is legal, but maintain that anti-circumvention still apply. From my brief research it seems you must provide citron with decryption keys yourself.

The first repo is licensed under GPL-2.0-or-later while there is no license statement in the second one. This means that work based on them cannot be legally incorporated into nixpkgs.

Is it okay with you that this derivation is distributed under MIT @simonwjackson and @Zempashi?

@samemrecebi
Copy link
Copy Markdown
Contributor Author

I believe citron should be safe to distribute with nixpkgs, since they share a similar anti-piracy stance to azahar, and since they have a clearnet download of the source available unlike some of the previous yuzu forks. Nintendo has admitted that emulation is legal, but maintain that anti-circumvention still apply. From my brief research it seems you must provide citron with decryption keys yourself.

The first repo is licensed under GPL-2.0-or-later while there is no license statement in the second one. This means that work based on them cannot be legally incorporated into nixpkgs.

Is it okay with you that this derivation is distributed under MIT @simonwjackson and @Zempashi?

I don't think @Zempashi will respond, it seems that he has been inactive in github for a couple of months. Also after some more research is seems like the the both of the flakes are kinda based or at least very similar to this by @liberodark.

@nixpkgs-ci nixpkgs-ci Bot added the 8.has: package (new) This PR adds a new package label Jan 27, 2026
@marcin-serwin marcin-serwin mentioned this pull request Jan 29, 2026
13 tasks
@samemrecebi
Copy link
Copy Markdown
Contributor Author

Ok, after the feedback from @marcin-serwin I have redid the package and mainly based it on the work done by @liberodark for his own citron work and also his old previous work on the removed torzu package. I did extend it a bit to match up with how the latest version of citron is built and also added some option for the building and the features. The derevation this version is based on GPL3.

@mio-19
Copy link
Copy Markdown
Contributor

mio-19 commented Jan 30, 2026

GPL3

nixpkgs is under MIT license. GPL3 works cannot be added to nixpkgs

@samemrecebi
Copy link
Copy Markdown
Contributor Author

samemrecebi commented Jan 30, 2026

GPL3

nixpkgs is under MIT license. GPL3 works cannot be added to nixpkgs

ok small question then, the torzu package I based by work on was in nixpkgs before and maintained by the same person, after the removal of torzu it was reuploaded under gpl3. In this case what license do we base the work on?

@samemrecebi
Copy link
Copy Markdown
Contributor Author

@liberodark for you is it acceptable that the package is distributed under MIT?

@marcin-serwin
Copy link
Copy Markdown
Contributor

marcin-serwin commented Jan 30, 2026

ok small question then, the torzu package I based by work on was in nixpkgs before and maintained by the same person, after the removal of torzu it was reuploaded under gpl3. In this case what license do we base the work on?

If you based the work on the removed nixpkgs code then it's under the MIT license. If the person just reuploaded the same file in their repo then it's still MIT. If the person made substantial changes to the recipe then those changes are released under the GPL license.

@samemrecebi
Copy link
Copy Markdown
Contributor Author

ok small question then, the torzu package I based by work on was in nixpkgs before and maintained by the same person, after the removal of torzu it was reuploaded under gpl3. In this case what license do we base the work on?

If you based the work on the removed nixpkgs code then it's under the MIT license. If the person just reuploaded the same file in their repo then it's still MIT. If the person made substantial changes to the recipe then those changes are released under the GPL license.

In my opinion it is very similar and some part nearly identical to the torzu package that was removed. At least based on that I think the package can fall under MIT then.

Copy link
Copy Markdown
Contributor

@marcin-serwin marcin-serwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash all the commits into the first one

Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix
@samemrecebi samemrecebi force-pushed the init-citron branch 3 times, most recently from 053210a to 251ccb0 Compare February 1, 2026 18:08
Copy link
Copy Markdown
Contributor

@marcin-serwin marcin-serwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes should be squashed into the first commit, even the review fixups, see https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md#commit-conventions

Comment thread pkgs/by-name/ci/citron-emu/package.nix
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
@liberodark
Copy link
Copy Markdown
Contributor

@liberodark for you is it acceptable that the package is distributed under MIT?

Hi,

I only work under GPL v3, but if you need to reuse my work on Citron or another Switch emulator under the MIT license, you have my permission.

Best Regards

@liberodark
Copy link
Copy Markdown
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 482846
Commit: 251ccb05fe68d5a7d5647c2376e958d786f1e707 (subsequent changes)
Merge: 0271b4d8b8b614178ce47699de7fdb5f4065e72f

Logs: https://github.com/liberodark/nixpkgs-review-gha/actions/runs/21665777139


x86_64-linux

✅ 1 package built:
  • citron-emu

aarch64-linux

No rebuilds


x86_64-darwin

No rebuilds


aarch64-darwin

No rebuilds

Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
Copy link
Copy Markdown
Contributor

@MagicRB MagicRB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the tzdb thing. it also builds, whether it works, dunno yet

Comment thread pkgs/by-name/ci/citron-emu/package.nix Outdated
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Feb 4, 2026
@samemrecebi
Copy link
Copy Markdown
Contributor Author

I think now every suggested changes are now implemented. @marcin-serwin is the current version acceptable?

Comment on lines +137 to +138
(lib.cmakeFeature "TITLE_BAR_FORMAT_IDLE" "${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) {}")
(lib.cmakeFeature "TITLE_BAR_FORMAT_RUNNING" "${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) | {}")
Copy link
Copy Markdown
Member

@pbsds pbsds Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a sanity check: is the | difference between these two intended?

Comment on lines +45 to +49
nx_tzdb = fetchzip {
url = "https://github.com/lat9nq/tzdb_to_nx/releases/download/${nx_tzdbVersion}/${nx_tzdbVersion}.zip";
hash = "sha256-YOIElcKTiclem05trZsA3YJReozu/ex7jJAKD6nAMwc=";
stripRoot = false;
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unsure whether this may require setting meta.sourceProvenance considering it is mainly data and not code. Had it been vendored in the citron-emu repo then we would not set meta.sourceProvenance...

Not a blocker

Copy link
Copy Markdown
Member

@pbsds pbsds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built and tested, LGTM. If not for the current state of the eden PR I would've merge this. However, in respect of #485097 (review) I'll go ahead and put this PR on your the radar as well @NixOS/nixpkgs-core.

I am in favor of distributing citron, please view my previous comment here as to why: #482846 (comment)

Both Citron and Eden have source code hosted on the clear net, however Citron in contrast to Eden displays a firmer anti-piracy stance while Eden only mentions "dumped/extracted from console" on their quick start page (their FAQ page is at the time of writing still pending). I have not viewed any of their Discord servers.

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 3+ This PR was reviewed and approved by three or more persons. and removed 12.approvals: 2 This PR was reviewed and approved by two persons. labels Feb 5, 2026
@samemrecebi
Copy link
Copy Markdown
Contributor Author

Built and tested, LGTM. If not for the current state of the eden PR I would've merge this. However, in respect of #485097 (review) I'll go ahead and put this PR on your the radar as well @NixOS/nixpkgs-core.

I am in favor of distributing citron, please view my previous comment here as to why: #482846 (comment)

Both Citron and Eden have source code hosted on the clear net, however Citron in contrast to Eden displays a firmer anti-piracy stance while Eden only mentions "dumped/extracted from console" on their quick start page (their FAQ page is at the time of writing still pending). I have not viewed any of their Discord servers.

Also to add to this to even join the discord server you need to verify you have a CFW switch using a tool running on a actual switch, without it you cannot access most stuff. Also to add all the testing I did was done using a real CFW switch with software I own and dumped.

Copy link
Copy Markdown
Contributor

@marcin-serwin marcin-serwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to my regular PC at the moment so I can't test this but the diff LGTM.

@pbsds
Copy link
Copy Markdown
Member

pbsds commented Feb 7, 2026

Also worth considering @nixos/nixpkgs-core: AFAIU nixpkgs doesn't do value judgements on the packages we distribute, since distribution does not equal endorsement. The removal of yuzu from nixpkgs was purely due to risk management, and the situation since then has changed. Also worth noting is that FreeBSD, Ubuntu and Debian still now distribute yuzu, and they have not been hit with any action from Nintendo.

@alyssais
Copy link
Copy Markdown
Member

Indeed we don't see any reason to block this or #485097, given the reasoning expressed in the two PR threads.

@pbsds pbsds added this pull request to the merge queue Feb 10, 2026
Merged via the queue into NixOS:master with commit 6167e8d Feb 10, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 3+ This PR was reviewed and approved by three or more persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants